<li class="list-group-item adressbookline" data-uid="{{ u.uid }}"
    data-indexer="{{ u.indexer }}"
        {% set kat = u.categories %}
        {% set kat = kat|merge(['all']) %}
        {% if u in app.user.adressbookFavorites %}
            {% set kat = kat|merge(['favorite']) %}
        {% endif %}
    data-filterafter="{{ kat|json_encode }}">

    <span class="breakWord d-flex align-items-center name">

        {% if u.profilePicture %}
            <div class="profilepicture me-2"
                 style="background-image: url('{{ vich_uploader_asset(u.profilePicture,'documentFile') }}')">
                <div class="dot with-icon"></div>
            </div>
        {% else %}
            <div class="profilepicture me-2"
                 style="background-color: #{{ u.username |colorFromString }}">
                {{ u|nameOfUserNoSymbol[:2]|upper }}
                <div class="dot with-icon"></div>
            </div>
        {% endif %}
        <div class="d-flex flex-column">
                   <p class="mb-0">{{ u|nameOfUser }} <small><a
                                   href="{{ path('app_adressbook_favorite',{'userId':u.uid}) }}"><i
                                       class="{% if u in app.user.adressbookFavorites %}fa isAddressbookFavorite{% else %}far{% endif %} fa-star"></i> </a></small>  {% if u in app.user.deputy %}
                           <i
                           class="ms-2 fa-solid fa-file-contract" data-mdb-toggle="tooltip"
                           title="{{ 'deputy.text.isDeputy'|trans }}"></i>{% endif %}</p>
        <p class="mb-0"><small>{{ u.username }}</small></p>
        </div>


    </span>
    <span class="noBreak d-flex align-items-center icon">
                {% if servers|length == 1 %}
                    <a class="text-success adhocConfirm me-2 "
                       data-text="{{ 'Wollen Sie mit diesem Teilnehmer eine Konferenz starten'|trans }}"
                       href="{{ path('add_hoc_confirm',{'serverId':servers[0].id,'userId':u.id}) }}">
                       <i class="fa-solid fa-phone-volume"></i>
                             </a>
                {% else %}
                    <a class="caretdown dropdown-toggle text-success" data-mdb-toggle="dropdown"
                       aria-haspopup="true" aria-expanded="false">
                                        <i class="fa-solid fa-phone-volume"></i>
                             </a>
                    <div class="dropdown-menu">
            {% for s in servers %}
                <a class="dropdown-item adhocConfirm"
                   data-text="{{ 'Wollen Sie mit diesem Teilnehmer eine Konferenz starten'|trans }}"
                   href="{{ path('add_hoc_confirm',{'serverId':s.id,'userId':u.id}) }}">{{ s.serverName }}</a>
            {% endfor %}

        </div>
                {% endif %}
                <a class="dropdown-toggle ms-3" type="button" data-mdb-toggle="dropdown"
                   aria-haspopup="true" aria-expanded="false"
                   data-mdb-auto-close="outside"
                ><i class="fas fa-ellipsis-v"></i></a>

                <ul class="dropdown-menu">

                        <li class="dropdown-item  d-flex">
                            {% if not deputyIsFromLDAP(app.user,u) %}
                                <a class=" {% if u in app.user.deputy %}text-success isDeputy{% endif %} "
                                   href="{{ path('app_deputy_add',{'deputyUid':u.uid}) }}">
                     <i class="fa-solid fa-file-contract"></i>{% if u in app.user.deputy %}{{ 'deputy.remove'|trans }}{% else %}{{ 'deputy.add'|trans }}{% endif %}</a>
                                <a class="ms-2" tabindex="0" data-mdb-toggle="popover" data-mdb-trigger="focus"
                                   data-mdb-content="{{ 'deputy.help'|trans }}"><i
                                            class="fa fa-question-circle"></i></a>
                                {% else %}
                                <a class="disabled">
                                     <i class="fa-solid fa-file-contract"></i>{{ 'deputy.fromLdap.disabled'|trans }}
                                </a>
                                <a class="ms-2" tabindex="0" data-mdb-toggle="popover" data-mdb-trigger="focus"
                                   data-mdb-content="{{ 'deputy.help.ldap'|trans }}"><i
                                            class="fa fa-question-circle"></i></a>
                            {% endif %}

                        </li>

                    {% if theme == false or theme.trashOnAdressBook == true %}
                        <div class="dropdown-divider"></div>
                        <li>
                           <a class=" dropdown-item confirmHref" href="{{ path('adressbook_remove_user',{'id':u.id}) }}"
                              data-text="{{ 'confirm.delete.adressbookUser'|trans }}">
                                     <i class="fa fa-trash text-danger"></i>{{ 'Löschen'|trans }}
                    </a>
                       </li>
                    {% endif %}
                </ul>
        </span></li>
